﻿#region

using System.Collections.Generic;
using BTL.OnlineTestingSocial.Domain.TestingEngine;
using BTL.OnlineTestingSocial.Services.TestingEngine.Service.DAL;
using BTL.Technology.Framework;

#endregion

namespace BTL.OnlineTestingSocial.Services.TestingEngine.Service.BLL
{
    public class CategoryManager : ICategoryManager
    {
        private readonly ICategoryRepository _categoryRepository;

        public CategoryManager(ICategoryRepository categoryRepository)
        {
            _categoryRepository = categoryRepository;
        }

        #region ICategoryManager Members

        public IEnumerable<Category> GetCategories()
        {
            Guard.MakeSureAllInstancesIsNullNot(_categoryRepository);

            return _categoryRepository.GetCategories();
        }

        #endregion
    }
}